<template>
	<div>
		<li>
			<div> {{ data.name }} </div>

			<ul v-if="data.childlist && data.childlist.length>0" >

					<Reply v-for="child in data.childlist" :key="child.id" :data="child" />	
			</ul>
		</li>
	</div>
</template>


<script>
	
	export default{
		//递归组件需要设置名称，才能间接或者直接调用那个自身
		name:'Reply',
		props:['data']
	};
	

</script>


<style>
	
	ul {
		padding-left:20px;
		list-style: none;
	}


</style>